<?php
defined('IN_IXDCW') or exit('Access Denied');
include tpl('header');
show_menu($menus);
?>
<div class="tt">发送信件</div>
	<form method="post" action="?" id="dform">
    <input type="hidden" name="moduleid" value="<?php echo $moduleid;?>"/>
    <input type="hidden" name="file" value="<?php echo $file;?>"/>
    <input type="hidden" name="action" value="<?php echo $action;?>"/>
    <table cellpadding="2" cellspacing="1" class="tb">
        <tr>
            <td class="tl"><span class="f_red">*</span> 发送类型</td>
            <td>
                <input type="radio" name="message[type]" value="1" onclick="Dd('group').style.display='';Dd('member').style.display='none';" checked id="type_1"/><label for="type_1"> 系统群发</label>
                <input type="radio" name="message[type]" value="0" onclick="Dd('group').style.display='none';Dd('member').style.display='';" id="type_0"/><label for="type_0"> 指定收件人</label>
            </td>
        </tr>
        <tr id="group" style="display:;">
            <td class="tl"><span class="f_red">*</span> 会员组</td>
            <td><?php echo group_checkbox('message[groupids][]', '', '2,3,4');?></td>
        </tr>
        <tr id="member" style="display:none;">
            <td class="tl"><span class="f_red">*</span> 收件人</td>
            <td><input type="text" size="50" name="message[touser]" id="touser" value="<?php echo $touser;?>"/>&nbsp;多个收件人请用空格分隔</td>
        </tr>
        <tr>
            <td class="tl"><span class="f_red">*</span> 标题</td>
            <td><input type="text" size="50" name="message[title]" id="title" datatype="*2-999" nullmsg="请填写标题" errormsg="最少输入2个字符"/> <span id="dtitle" class="f_red"></span></td>
        </tr>
        <tr>
            <td class="tl"><span class="f_red">*</span> 内容</td>
	        <td><?php echo Post::kindEditor('message[content]', $moduleid, '', 'datatype="*5-99999" nullmsg="请填写内容" errormsg="内容最少5字"','800px'); ?></td>
        </tr>
        </tbody>
    </table>
    <div class="sbt"><input type="submit" name="submit" value=" 确 定 " class="btn">&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" name="reset" value=" 重 置 " class="btn"/></div>
</form>
<script type="text/javascript">
	seajs.use(['$', 'vf', 'vf-css', 'easyui','easyui-css'], function($){
		$('#dform').Validform({
			beforeCheck:function(curform){
				lemon.editor.post_content_.sync();
			}
		});
	})
</script>
<script type="text/javascript">Menuon(0);</script>
<?php include tpl('footer'); ?>